<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/style/layout.css"/>  
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/style/index.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
    $(function(){
        $("#nav_change ul li").click(function(){
            $("#nav_change ul li").each(function(){
                var navid=$(this).attr('id')+'_list';
                $("#"+navid).hide();
                $(this).removeClass('selected');
            })
            $("#"+$(this).attr('id')+'_list').show('slow');
            $(this).addClass('selected');
        })
    })
</script>
</head>
<body>
    <div class="main">
        <!--head-->
        <div class="header">
            <div class="logo f_l">后台管理</div>
            <div class="loginfo f_r">
                <p>欢迎你，admin</p>
                <p>上次登陆时间：2013-07-08</p>
                <p><a href="#">前台首页</a> <a href="#">注销</a></p>
            </div>
        </div>
        <!--main left-->
        <div class="sidebar f_l autoheight">
            <div class="nav f_l" id="nav_change">
                <ul>
                    <li class="selected" id="nav_1"><a>系统管理</a></li>
                    <li id="nav_2"><a>内容管理</a></li>
                    <li id="nav_3"><a>友情链接</a></li>
                </ul>
            </div>
            <div class="menu f_l">
                <div id="nav_1_list">
                    <h3>基本设置 <span class="toggle">HIDE</span></h3>
                    <ul>
                        <li><a href="" target="content">系统参数</a></li>
                    </ul>
                    <h3>频道模型 <span class="toggle">HIDE</span></h3>
                    <ul>
                        <li><a href="<?php echo U('channel/index');?>" target="content">模型列表</a></li>
                        <li><a href="<?php echo U('channel/add');?>" target="content">新建模型</a></li>
                        <li><a href="<?php echo U('cfieldtpl/index');?>" target="content">字段模板</a></li>
                    </ul>
                    <h3>URL设置 <span class="toggle">HIDE</span></h3>
                    <ul>
                        <li><a href="<?php echo U('route/urlrule');?>" target="content">URL设置</a></li>
                        <li><a href="<?php echo U('route/route');?>" target="content">路由规则</a></li>
                    </ul>
                    <h3>缓存管理 <span class="toggle">HIDE</span></h3>
                    <ul>
                        <li><a href="<?php echo U('cacheManage/index');?>" target="content">缓存设置</a></li>
                        <li><a href="<?php echo U('cacheManage/clear');?>" target="content">清理缓存</a></li>
                    </ul>
                </div>
                <div id="nav_2_list" style="display: none;">
                     <h3>分类管理 <span class="toggle">HIDE</span></h3>
                    <ul>
                        <li><a href="<?php echo U('type/add');?>" target="content">添加分类</a></li>
                        <li><a href="<?php echo U('type/index');?>" target="content">分类列表</a></li>
                    </ul>
                     <h3>文档管理 <span class="toggle">HIDE</span></h3>
                    <ul>
                        <li><a href="<?php echo U('archive/add');?>" target="content">发布文档</a></li>
                        <li><a href="<?php echo U('archive/index');?>" target="content">文档列表</a></li>
                    </ul>
                     <h3>内容管理 <span class="toggle">HIDE</span></h3>
                     <ul>
                         <li><a href="<?php echo U('file/filemanage');?>" target="content">文件管理器</a></li>
                     </ul>
                </div>
                <div id="nav_3_list" style="display:none; ">
                    <h3>友情链接 <span class="toggle">HIDE</span></h3>
                    <ul>
                        <li><a href="<?php echo U('type/add');?>" target="content">链接管理</a></li>
                        <li><a href="<?php echo U('type/index');?>" target="content">添加链接</a></li>
                    </ul>
                   
                </div>
            </div>
            <div class="copyright">Made by 吾爱 qq296624314</div>
        </div>
        <!--main right-->
        <div class="content f_r autoheight">
            <iframe name="content" src="<?php echo U('Index/welcome');?>" style="width: 100%;border:none;" class="autoheight"></iframe>
        </div>
        
    </div>
    <script type="text/javascript">
        $(function(){autoheight();$(window).resize(function(){autoheight();})})
        $(function(){$(".menu ul li > a").click(function(){
                var alllinks=$(".menu ul li > a");
                alllinks.each(function(){$(this).removeClass('actived');$(this).parent("li").removeClass('liactived');});
                $(this).addClass('actived');
                $(this).parent("li").addClass('liactived');
        })})
        function autoheight(){
            var maxautoheight=400;
            $(".autoheight").each(function(){
                nowheight=$(this).outerHeight();
                if(nowheight > maxautoheight){
                    maxautoheight=nowheight;
                }
            });
            mainheight=$(window).outerHeight()-$(".header").outerHeight();
            myheight=Math.max(maxautoheight,mainheight);
            $(".autoheight").height(myheight);
             
        }
        $(function(){
            $("span.toggle").click(function(){
                spanobj=$(this);
                $(this).parent().next("ul").toggle('slow','swing',function(){
                    if(spanobj.html()=='HIDE'){
                        spanobj.html('SHOW');
                    }else{
                        spanobj.html('HIDE');
                    }
                });
            })
        })
    </script>
</body>
</html>